package com.jinzheng.qhnetty.commont;

import org.springframework.util.ConcurrentReferenceHashMap;

import java.util.Map;

/**
 * @ClassName MessageInfoMap
 **/
public class LocalCache {

    private static Map<String, Object> infoMap = new ConcurrentReferenceHashMap<>(16, ConcurrentReferenceHashMap.ReferenceType.WEAK);

    public static void set(String key, Object object) {
        infoMap.put(key, object);
    }

    public static void remove(String key) {
        infoMap.remove(key);
    }

    public static Object get(String key) {
        return infoMap.get(key);
    }

}
